{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 安装配置环境\n",
    "\n",
    "[同济子豪兄](https://space.bilibili.com/1900783) 2022-6-25"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1.安装Neo4j"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 安装Neo4j Desktop"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "https://neo4j.com/download/"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 创建新Project：Medical_QA"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 创建新DBMS：medical_neo4j"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 启动DBMS，在浏览器中访问`localhost:7474`"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2.安装配置Python\n",
    "\n",
    "### 安装基础环境\n",
    "\n",
    "视频：【Windows安装配置Python】https://www.bilibili.com/video/BV1P5411W7g5?p=2\n",
    "\n",
    "视频：【MacOS安装配置Python】https://www.bilibili.com/video/BV1P5411W7g5?p=3\n",
    "\n",
    "视频：【python数据分析神器Jupyter notebook快速入门】https://www.bilibili.com/video/BV1Q4411H7fJ"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 安装第三方库"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "!pip install py2neo pyahocorasick numpy pandas -i https://pypi.tuna.tsinghua.edu.cn/simple/"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 验证安装成功"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 验证安装成功\n",
    "import py2neo\n",
    "\n",
    "# 注意，这里的用户名为neo4j全局用户名，而非DBMS或者database的名称\n",
    "g = Graph('http://localhost:7474', auth=('neo4j', 'ABC123'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
